package top.wardyan.wmes.rfid.vo;

import java.util.ArrayList;
import java.util.List;

public class Team {

	/** 小组ID **/
	Integer id;
	/** 小组代码 **/
	String code;
	/** 小组名称 **/
	String name;
	/** 是否在职 true在职， 否则离职 **/
	Boolean active;
	
	/** 所在部门 **/
	Dept dept;
	
	List<Empl> empls;

	public Integer getId() {
		return id;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}
	public Dept getDept() {
		return dept;
	}
	public String getDeptName() {
		return dept != null ? dept.getName() : "";
	}

	public Team setId(Integer id) {
		this.id = id;
		return this;
	}

	public Team setCode(String code) {
		this.code = code;
		return this;
	}

	public Team setName(String name) {
		this.name = name;
		return this;
	}

	public Team setDept(Dept dept) {
		this.dept = dept;
		return this;
	}

	public Boolean getActive() {
		return active;
	}

	public List<Empl> getEmpls() {
		return empls;
	}

	public Team setActive(Boolean active) {
		this.active = active;
		return this;
	}

	public Team setEmpls(List<Empl> empls) {
		this.empls = empls;
		return this;
	}
	
	public Team addEmpls(Empl empl) {
		if(empls == null) {
			empls = new ArrayList<>();
		}
		empls.add(empl);
		return this;
	}
	
	
}
